home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 60 / IOPROG_60.ISO / soft / c++ / gsl-1.1.1-setup.exe / {app} / include / gsl / gsl_fit.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-04-20  |  3.3 KB  |  106 lines

  1. /* fit/gsl_fit.h
  2.  * 
  3.  * Copyright (C) 2000 Brian Gough
  4.  * 
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2 of the License, or (at
  8.  * your option) any later version.
  9.  * 
  10.  * This program is distributed in the hope that it will be useful, but
  11.  * WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * General Public License for more details.
  14.  * 
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. #ifndef __GSL_FIT_H__
  21. #define __GSL_FIT_H__
  22.  
  23. #include <stdlib.h>
  24. #include <gsl/gsl_math.h>
  25.  
  26. #undef __BEGIN_DECLS
  27. #undef __END_DECLS
  28. #ifdef __cplusplus
  29. # define __BEGIN_DECLS extern "C" {
  30. # define __END_DECLS }
  31. #else
  32. # define __BEGIN_DECLS /* empty */
  33. # define __END_DECLS /* empty */
  34. #endif
  35.  
  36. __BEGIN_DECLS
  37.  
  38. int gsl_fit_linear (const double * x, const size_t xstride,
  39.                     const double * y, const size_t ystride,
  40.                     const size_t n,
  41.                     double * c0, double * c1, 
  42.                     double * cov00, double * cov01, double * cov11, 
  43.                     double * sumsq);
  44.  
  45.  
  46. int gsl_fit_wlinear (const double * x, const size_t xstride,
  47.                      const double * w, const size_t wstride,
  48.                      const double * y, const size_t ystride,
  49.                      const size_t n,
  50.                      double * c0, double * c1, 
  51.                      double * cov00, double * cov01, double * cov11, 
  52.                      double * chisq);
  53.  
  54. int
  55. gsl_fit_linear_est (const double x, 
  56.                     const double c0, const double c1, 
  57.                     const double c00, const double c01, const double c11,
  58.                     double *y, double *y_err);
  59.  
  60.  
  61. int gsl_fit_mul (const double * x, const size_t xstride,
  62.                  const double * y, const size_t ystride,
  63.                  const size_t n,
  64.                  double * c1, 
  65.                  double * cov11, 
  66.                  double * sumsq);
  67.  
  68. int gsl_fit_wmul (const double * x, const size_t xstride,
  69.                   const double * w, const size_t wstride,
  70.                   const double * y, const size_t ystride,
  71.                   const size_t n,
  72.                   double * c1, 
  73.                   double * cov11, 
  74.                   double * sumsq);
  75.  
  76.  
  77. int
  78. gsl_fit_mul_est (const double x, 
  79.                  const double c1, 
  80.                  const double c11,
  81.                  double *y, double *y_err);
  82.  
  83.  
  84. /* choose better names!! */
  85.  
  86. int gsl_fit_poly (const double * x, 
  87.                   const double * w,
  88.                   const double * y, 
  89.                   size_t n,
  90.                   double * c, size_t m,
  91.                   double * chisq);
  92.  
  93. int gsl_fit_fns (const double * A, 
  94.                  const double * w,
  95.                  const double * y, 
  96.                  size_t n,
  97.                  double * c, size_t m,
  98.                  double * chisq);
  99.  
  100. int gsl_fit_linear_nd (double * m, double * y, double * w);
  101.  
  102.  
  103. __END_DECLS
  104.  
  105. #endif /* __GSL_FIT_H__ */
  106.